package com.artron.mediaartron.ui.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;

import com.artron.mediaartron.base.BaseFragmentPagerAdapter;
import com.artron.mediaartron.data.entity.FrameData;
import com.artron.mediaartron.ui.fragment.made.SelectionHorizontalFragment;

import java.util.List;

/**
 * Class description here
 *
 * @author doing
 * @version 1.0.0
 * @since 2017-09-22.
 */

public class SelectionHorizontalPagerAdapter extends BaseFragmentPagerAdapter {

    private List<FrameData> mData;

    public SelectionHorizontalPagerAdapter(FragmentManager fm) {
        super(fm);
    }

    public SelectionHorizontalPagerAdapter(FragmentManager childFragmentManager, List<FrameData> data) {
        this(childFragmentManager);
        mData = data;

    }

    @Override
    public Fragment getItem(int position) {
        return SelectionHorizontalFragment.newInstance(mData.get(position));
    }

    @Override
    public int getCount() {
        return mData.size();
    }
}
